Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update cudnn semantic version in README to avoid performance issue #1239

Closed
wants to merge 1 commit into from

Conversation

kkew3
Copy link

@kkew3 kkew3 commented Feb 7, 2025

I suggest changing the version spec of nvidia-cublas-cu12 and nvidia-cudnn-cu12. Using existing one:

pip install nvidia-cublas-cu12 nvidia-cudnn-cu12==9.*

on 2025-02-07 gives

nvidia-cublas-cu12==12.8.3.14
nvidia-cudnn-cu12==9.7.1.26

which results in cuda running 30x slower than cpu on my Ubuntu 22.04, with a 6 seconds wav audio.

After I downgrade them to:

nvidia-cublas-cu12==12.4.5.8
nvidia-cudnn-cu12==9.1.0.70

which is what torch==2.6.0 currently depends on, everything works fine. Then, I go through a thorough grid search over recent cublas and cudnn versions, and find that all cudnn after 9.6 (inclusive) exhibit the aforementioned performance issue.

I didn't study the lower bound, though. Hence, I make it compatible with current semantic version, i.e. >=9).

That's why I make this change.

Thank you so much!

I suggest changing the version spec of `nvidia-cublas-cu12` and
`nvidia-cudnn-cu12`. Using existing one:

```bash
pip install nvidia-cublas-cu12 nvidia-cudnn-cu12==9.*
```

on 2025-02-07 gives

```
nvidia-cublas-cu12==12.8.3.14
nvidia-cudnn-cu12==9.7.1.26
```

which results in cuda running 30x slower than cpu on my Ubuntu
22.04, with a 6 seconds wav audio.

After I downgrade them to:

```
nvidia-cublas-cu12==12.4.5.8
nvidia-cudnn-cu12==9.1.0.70
```

which is what `torch==2.6.0` currently depends on, everything
works fine. Then, I go through a thorough grid search over recent
cublas and cudnn versions, and find that all cudnn after 9.6 (inclusive)
exhibit the aforementioned performance issue.

I didn't study the lower bound, though. Hence, I make it compatible with
current semantic version, i.e. `>=9`).

That's why I make this change.
@MahmoudAshraf97
Copy link
Collaborator

Hello, we just suggest the major version for reference, since this project does not depend on the PYPI cudnn installation we cannot pin the version to anything except the major version

@kkew3
Copy link
Author

kkew3 commented Feb 7, 2025

Hello. Thank you so much for your reply!

IMHO it would still be better to make

we just suggest the major version for reference

explicit in README, so that users will know they may need to adjust the cublas and/or cudnn version accordingly, depending on their own dev environments. It could be somewhat confusing to simply state pip install nvidia-cublas-cu12 nvidia-cudnn-cu12==9.* in README, as this command may not work out-of-the-box for every user.

@MahmoudAshraf97
Copy link
Collaborator

unfortunately, tuning the cudnn version is not an option for most users, especially that it's closely tied with with other packages that might exist in the same environment such as pytorch which is only compatible with a single cudnn version. I know CUDA dependencies are a headache to manage that's why they are out of the scope of the requirements even though they are required, simply because there's no one solution fits all here so we leave it up to the users to decide

@kkew3
Copy link
Author

kkew3 commented Feb 8, 2025

I got your point. Thank you so much!

@kkew3 kkew3 closed this Feb 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants